<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!-- The HTML 4.01 Transitional DOCTYPE declaration-->
<!-- above set at the top of the file will set     -->
<!-- the browser's rendering engine into           -->
<!-- "Quirks Mode". Replacing this declaration     -->
<!-- with a "Standards Mode" doctype is supported, -->
<!-- but may lead to some differences in layout.   -->

<html>
  <head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    <title>Road2Trip REST API</title>
	<style>
	body {
		font-family:Geneva, Arial, Helvetica, sans-serif;
		font-size:14px;	
		width:800px;
	 }
	 
	 h1{
	  color:#003300;
	  font-size:20px;
	  text-align:center; 
	  font-weight:bold;
	  padding-bottom:2px;
	  width:80%;
	  margin: 0 auto;
	  border-bottom:1px solid #003300;
	 }
	 h2{
	  color:#FF6600;
	  text-decoration:underline;
	  font-weight:bold;
	  font-size:18px;
		margin-top:35px;
	 }
	 h3{
	  color:#FF6600;
	  font-weight:bold;
	  font-size:15px;
	 }
	 h4{
	  color:#003300;
	  font-size:12px;
	 }
	.block{
		margin:5px;		
	}
	table, tr, td, th{
		border:1px solid #666666;
		border-collapse:collapse;
		padding: 5px;
		font-family:Geneva, Arial, Helvetica, sans-serif;
		font-size:13px;	
	}
	table {
		margin: 5px 0px 5px 10px;
		width:100%;
	}
	
	.code{
		font-family:courier;
		font-size: 9pt;
		color:gray;
		margin: 5px 0px 5px 10px;
		border:1px solid #999999;
		background-color:#EEEEEE;
		padding: 5px;
		width:100%;
		overflow:hidden;
		
	}	
	.attribute{
		font-weight:bold;
	}
	.menu {		
	}
	.menuItem {
		margin-top:15px;		
	}
	.menuSubItem {
		margin-left:15px;		
	}
	
	</style>  
<script>
function loadXMLDoc(dname)
{
if (window.XMLHttpRequest)
  {
  xhttp=new XMLHttpRequest();
  }
else
  {
  xhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
xhttp.open("GET",dname,false);
xhttp.send("");
return xhttp.responseXML;
}

function displayResult()
{
xml=loadXMLDoc("api.xml");
xsl=loadXMLDoc("api.xsl");
// code for IE
if (window.ActiveXObject)
  {
  ex=xml.transformNode(xsl);
  document.getElementById("mainDIV").innerHTML=ex;
  }
// code for Mozilla, Firefox, Opera, etc.
else if (document.implementation && document.implementation.createDocument)
  {
  xsltProcessor=new XSLTProcessor();
  xsltProcessor.importStylesheet(xsl);
  resultDocument = xsltProcessor.transformToFragment(xml,document);
  document.getElementById("mainDIV").appendChild(resultDocument);
  }
}
</script>
</head>
<body onload="displayResult()">

<h1>Road2Trip REST API</h1>

  
<h2>Global use</h2>
  	<p class="block">
  	  	All requests can use the parameters below 
	</p>
	<table class="parameters">
		<tr>
		<td>l</td>
		<td>language ISO 639-1 code. If empty the server try to retrive the language in the HTTP header or used "en"</td>		
		</tr>
		<tr>
		<td>appID</td>		
		<td>The application iD. Needed to use this API</td>
		</tr>
	</table>		  
	
<div class="block">
All responses are wrapped inside a block as below
</div>
<textarea class="code" rows="3">
<r2tapi language="en">
	&lt;!-- here the reponse itself --&gt;
</r2tapi>
</textarea>
	    
<div id="mainDIV"></div>
	
</body>
</html>